﻿<Window x:Class="RFDeviceTester.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        Title="MainWindow" Loaded="MainWindow_OnLoaded" mc:Ignorable="d" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" d:DesignHeight="350" d:DesignWidth="600" SizeToContent="WidthAndHeight">
    <Grid>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="Auto"/>
            <ColumnDefinition Width="260"/>
            <ColumnDefinition Width="*" MaxWidth="200"/>
        </Grid.ColumnDefinitions>

        <StackPanel Grid.Column="1" Margin="10,0,0,0">
            <Label Name="LibVersionLabel" Content="Library version: " HorizontalAlignment="Center"></Label>
            <Button Name="ClickButton" Margin="0,5,0,5" Content="Жать кнопку" HorizontalAlignment="Center" 
                    VerticalAlignment="Top" Click="ClickButton_OnClick" Grid.Column="1"/>
            <DataGrid Name="InfoGrid" AutoGenerateColumns="False" IsReadOnly="True">
            </DataGrid>
        </StackPanel>
        <StackPanel Grid.Column="0">
            <StackPanel IsEnabled="False">
                <StackPanel Orientation="Horizontal">
                    <TextBox Name="PortBox" HorizontalAlignment="Left" Height="23" TextWrapping="Wrap" Text="" VerticalAlignment="Top" Width="100"/>
                    <Label>COM порт</Label>
                </StackPanel>
                <StackPanel Orientation="Horizontal">
                    <TextBox Name="SpeedBox" HorizontalAlignment="Left" Height="23" TextWrapping="Wrap" Text="" VerticalAlignment="Top" Width="100"/>
                    <Label>Скорость</Label>
                </StackPanel>
                <StackPanel Orientation="Horizontal">
                    <TextBox Name="AddressBox" HorizontalAlignment="Left" Height="23" TextWrapping="Wrap" Text="" VerticalAlignment="Top" Width="100"/>
                    <Label>Адрес</Label>
                </StackPanel>
            </StackPanel>
            <Label Content="620 параметры"></Label>
            <StackPanel Name="Params620Panel">
                <StackPanel Orientation="Horizontal">
                    <TextBox Name="Port620" HorizontalAlignment="Left" Height="23" TextWrapping="Wrap" Text="6003" VerticalAlignment="Top" Width="100"/>
                    <Label>Порт</Label>
                </StackPanel>
                <StackPanel Orientation="Horizontal">
                    <TextBox Name="Ip620" HorizontalAlignment="Left" Height="23" TextWrapping="Wrap" Text="192.168.1.2" VerticalAlignment="Top" Width="100"/>
                    <Label>Ip</Label>
                </StackPanel>
                <StackPanel Orientation="Horizontal">
                    <Label Name="PointsCountLabel" HorizontalAlignment="Left" Height="23" VerticalAlignment="Top" Width="70"/>
                    <Label>Points Count</Label>
                </StackPanel>
            </StackPanel>
            <Button Name="GetPacket" Content="Найти пакет" Click="GetPacket_OnClick"/>
            <Separator Margin="0,5,0,5"></Separator>
            <Label Content="Laser Level" HorizontalAlignment="Center" Margin="0,0,0,5"></Label>
            <StackPanel Orientation="Horizontal" Margin="0,0,0,5">
                <TextBox Name="LaserLevelBox" Width="100" TextWrapping="WrapWithOverflow"/>
                <Label Name="LaserLevelLabel" Content="Value"/>
            </StackPanel>
            <StackPanel Orientation="Horizontal" HorizontalAlignment="Stretch">
                <Button Name="GetParamButton" Content="Get value" Margin="10,0,10,0" Click="GetParamButton_OnClick"/>
                <Button Name="SetParamButton" Content="Set value" Click="SetParamButton_OnClick"/>
            </StackPanel>
        </StackPanel>
        
        <Grid Grid.Column="2" Margin="10,0,0,0">
            <Grid.RowDefinitions>
                <RowDefinition Height="27" />
                <RowDefinition Height="*" />
                <RowDefinition Height="27" />
                <RowDefinition Height="*" />
            </Grid.RowDefinitions>
            <Label Name="PointsListLabel" Content="Points" Grid.Row="0" HorizontalAlignment="Center"/>
            <ListBox Grid.Row="1" Name="PointsList"/>
            <Label Name="TcpResultLabel" Content="TcpGetResult" Grid.Row="2" HorizontalAlignment="Center"/>
            <ListView Name="UdpResList" Grid.Row="3"/>
        </Grid>

    </Grid>
</Window>
